// 此处存放所有与登录有关的接口
import request from '@/utils/request'

// 获取图形验证码
export const getPicCode = () => {
  return request.get('/captcha/image')
}

// 获取短信验证码
export const getCode = (picCode, picKey, mobile) => {
  return request.post('/captcha/sendSmsCaptcha', {
    form: {
      captchaCode: picCode,
      captchaKey: picKey,
      mobile: mobile
    }
  })
}

// 登录接口
export const codeLogin = (megCode, mobile) => {
  return request.post('/passport/login', {
    form: {
      smsCode: megCode,
      mobile: mobile,
      isParty: false,
      partyData: {}
    }
  })
}
